<%-- 
    Document   : SetSubject
    Created on : 9/05/2008, 11:35:54
    Author     : DidierLeung
--%>

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Set Subject Page</title>
    </head>
    <body>
        <h2>Set Subject Page</h2>
        <f:view>
            <h:form id="setSubjectForm">
                <table>
                    <tr>
                        <td>
                            Subject Code:
                        </td>
                        <td>
                            <h:inputText id="subCode" value="#{SetSubjectBean.subjectCode}"
                                        required="true" requiredMessage="Subject must have a subject code"
                                        validator="#{SetSubjectBean.validateSubjectCode}"/>
                            <h:message id="subCodeErrorMsg" for="subCode" showSummary="true" showDetail="false"
                                     style="color: red; font-family: 'New Century Schoolbook', serif;
                                        font-style: oblique"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Subject Name:
                        </td>
                        <td>
                            <h:inputText id="subName" value="#{SetSubjectBean.subjectName}" 
                                         required="true" requiredMessage="Subject must have a name"/>
                            <h:message id="subNameErrorMsg" for="subName" showSummary="true" showDetail="false"
                                     style="color: red; font-family: 'New Century Schoolbook', serif;
                                        font-style: oblique"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Number of Tutorial Class Allocated:
                        </td>
                        <td>
                            <h:selectOneMenu id="tuteNoList" value="#{SetSubjectBean.noOfTutorialClass}">
                                <f:selectItem itemLabel="1" itemValue="1"/>
                                <f:selectItem itemLabel="2" itemValue="2"/>
                                <f:selectItem itemLabel="3" itemValue="3"/>
                                <f:selectItem itemLabel="4" itemValue="4"/>
                                <f:selectItem itemLabel="5" itemValue="5"/>
                                <f:selectItem itemLabel="6" itemValue="6"/>
                                <f:selectItem itemLabel="7" itemValue="7"/>
                                <f:selectItem itemLabel="8" itemValue="8"/>
                                <f:selectItem itemLabel="9" itemValue="9"/>
                                <f:selectItem itemLabel="10" itemValue="10"/>
                            </h:selectOneMenu>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:commandButton id="nextBtn" value="Next >" action="#{SetSubjectBean.setTutorialClass}" />
                        </td>
                        <td>
                            <h:commandButton id="cancelBtn" value="Cancel" action="cancel" />
                        </td>
                    </tr>
                </table>
            </h:form>
        </f:view>
    </body>
</html>
